<template>
  <a-card>
    <template #title>
      <span class="icon"></span>
      <span class="text">我的任务</span>
    </template>
    <template #extra>更多></template>
    <a-list :bordered="false">
      <a-list-item v-for="(item, idx) in taskInfo" :key="idx">
        <a-list-item-meta>
          <template #avatar>
            <a-avatar shape="square">
              <img alt="avatar" :src="TxtPng" />
            </a-avatar>
          </template>
          <template #title>
            <span style="font-size: 14px; font-weight: 600; color: #004ea2">{{
              item.title1
            }}</span>
            <span style="font-size: 14px; font-weight: 500; color: #333">{{
              item.title2
            }}</span>
          </template>
          <template #description>
            <span style="font-size: 14px; line-height: 24px; color: #999">
              {{ item.content }}
            </span>
          </template>
        </a-list-item-meta>
        <template #actions>
          <div class="togo">去完成</div>
        </template>
      </a-list-item>
    </a-list>
  </a-card>
</template>

<script lang="ts" setup>
import { ref, onMounted } from "vue";
import TxtPng from "@/assets/images/txt.png";

const taskInfo = ref([]);
const fetchData = () => {
  taskInfo.value = [
    {
      title1: "【学籍管理】",
      title2: "学校管理员发起工资发",
      content: "段落示意：蚂蚁金服设计平台 ",
    },
    {
      title1: "【学籍管理】",
      title2: "学校管理员发起工资发",
      content: "段落示意：蚂蚁金服设计平台 ",
    },
    {
      title1: "【学籍管理】",
      title2: "学校管理员发起工资发",
      content: "段落示意：蚂蚁金服设计平台 ",
    },
  ];
};
onMounted(() => {
  fetchData();
});
</script>

<style lang="less">
.arco-card {
  width: 100%;
  height: 350px;
  background: #fff;
  border-radius: 10px;
  margin-bottom: 30px !important;

  .arco-card-body {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
  }

  .arco-card-header-title {
    display: flex;
    align-items: center;

    .icon {
      display: inline-block;
      width: 18px;
      height: 18px;
      margin-right: 8px;
      background: url("@/assets/images/计划.png") center center no-repeat;
      background-size: contain;
    }

    .text {
      font-family: SourceHanSansSCVF-Medium;
      font-size: 18px;
      font-weight: 500;
      line-height: 20px;
      color: #9caaba;
    }
  }
  .arco-card-header-extra {
    font-size: 15px;
    color: #999 !important;
  }
  .arco-list-item {
    padding: 10px !important;
    .arco-list-item-action {
      .togo {
        position: relative;
        top: -12px;
        right: -10px;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 70px;
        height: 20px;
        margin-left: 8px;
        font-size: 14px;
        color: #004ea2;
        background: #eff6ff;
        border: 1px solid #004ea2;
        border-radius: 20px;
      }
    }
  }
}
</style>
